import java.util.LinkedList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-10-10
 * Time: 22:28
 */
public class Test {
    public static void main1(String[] args) {
        MySingleList ret = new MySingleList();
        ret.addLast(12);
        ret.addLast(23);
        ret.addLast(12);
        ret.addLast(45);
        ret.addLast(56);
        ret.addLast(67);
        ret.display();
        //ret.removeAllKey(12);
        //ret.reverse();
        //ret.display();

        MySingleList ret1 = new MySingleList();
        ret1.addLast(12);
        ret1.addLast(23);
        ret1.addLast(12);
        ret1.addLast(45);
        ret1.addLast(56);
        ret1.addLast(67);

        MySingleList.ListNode cur1 = ret.head;
        MySingleList.ListNode cur2 = ret1.head;
        while(cur1.next != null){
            cur1 = cur1.next;
        }
        cur1.next = ret1.head;

        while(cur2.next != null){
            cur2 = cur2.next;
        }
        cur2.next = ret.head;

        ret.display();
    }

    public static void main(String[] args) {

    }
}
